package com.yejiarong.influxdb.api.service;

import com.yejiarong.common.tools.HttpResult;
import com.yejiarong.influxdb.api.config.HeaderInterceptor;
import com.yejiarong.influxdb.api.bean.request.SavePointRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author YeJR
 */
@FeignClient(value = "influxdb-service",contextId = "influxdbService",  configuration = HeaderInterceptor.class)
public interface InfluxdbService {


    /**
     * 收集 point
     * @param exchange 消息队列
     * @param saveRequest point
     * @return HttpResult
     */
    @PostMapping(value = "/influxdb/collectPoint/{exchange}")
    HttpResult<Void> collectPoint(@PathVariable(value = "exchange") String exchange, @RequestBody SavePointRequest saveRequest);
}
